package com.nutiteq.labels;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.nutiteq.log.Log;

public class CustomElements extends MIDlet {
  public static CustomElements instanse;
  private CustomCanvas canvas;

  public CustomElements() {
    instanse = this;
  }

  protected void destroyApp(final boolean arg0) throws MIDletStateChangeException {
    canvas = null;
    instanse = null;
    notifyDestroyed();
  }

  protected void pauseApp() {

  }

  protected void startApp() throws MIDletStateChangeException {
    Log.enableAll();
    if (canvas == null) {
      canvas = new CustomCanvas();
    }

    Display.getDisplay(instanse).setCurrent(canvas);
  }
}
